/*
 * 文件名称:          IProxySessionFactoryBuilder.java
 * 版权所有@ 2016——2017 无锡聆音科技有限公司，保留所有权利
 * 时间:             2016年7月27日 下午9:21:11
 */
package com.lingyin.database.transaction.hibernate;

import java.io.IOException;
import java.util.Properties;

import javax.sql.DataSource;

import org.hibernate.Interceptor;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.NamingStrategy;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;

/**
 *  
 * 
 * @项目        hibernate.database.transaction
 * 
 * @作者:       关宏新
 * 
 * @日期:       2016年7月27日
 * 
 * @负责人:    关宏新
 * 
 * @负责小组:   聆音项目组
 * 
 */
public interface IProxySessionFactoryBuilder
{

    /**
     * @param dataSource 设置 dataSource
     */
    void setDataSource(DataSource dataSource);

    /**
     * @param configLocations 设置 configLocations
     */
    void setConfigLocations(Resource[] configLocations);

    /**
     * 
     * @param locations 增加新的配置文件
     */
    void addConfigLocations(String ... locations);

    /**
     * @param mappingResources 设置 mappingResources
     */
    void setMappingResources(String[] mappingResources);

    /**
     * @param resources 设置 resources
     */
    void addMappingResources(String ... resources);

    /**
     * @param mappingLocations 设置 mappingLocations
     */
    void setMappingLocations(Resource[] mappingLocations);

    /**
     * @param addMappingLocations 设置 mappingLocations
     */
    void addMappingLocations(String ... addMappingLocations);

    /**
     * @param cacheableMappingLocations 设置 cacheableMappingLocations
     */
    void setCacheableMappingLocations(Resource[] cacheableMappingLocations);

    /**
     * @param mappingLocations 设置 mappingLocations
     */
    void addCacheableMappingLocations(String ... mappingLocations);

    /**
     * @param mappingJarLocations 设置 mappingJarLocations
     */
    void setMappingJarLocations(Resource[] mappingJarLocations);

    /**
     * @param addMappingJarLocations 设置 addMappingJarLocations
     */
    void addMappingJarLocations(String ... addMappingJarLocations);

    /**
     * @param mappingDirectoryLocations 设置 mappingDirectoryLocations
     */
    void setMappingDirectoryLocations(Resource[] mappingDirectoryLocations);

    /**
     * @param addmappingDirectoryLocations 设置 addmappingDirectoryLocations
     */
    void addMappingDirectoryLocations(String ... addmappingDirectoryLocations);

    /**
     * @param entityInterceptor 设置 entityInterceptor
     */
    void setEntityInterceptor(Interceptor entityInterceptor);

    /**
     * @param namingStrategy 设置 namingStrategy
     */
    void setNamingStrategy(NamingStrategy namingStrategy);

    /**
     * @param hibernateProperties 设置 hibernateProperties
     */
    void setHibernateProperties(Properties hibernateProperties);

    /**
     * @param annotatedClasses 设置 annotatedClasses
     */
    void setAnnotatedClasses(Class< ? >[] annotatedClasses);

    /**
     * @param addAnnotatedClasses 设置 addAnnotatedClasses
     */
    void addAnnotatedClasses(Class< ? > ... addAnnotatedClasses);

    /**
     * @param annotatedPackages 设置 annotatedPackages
     */
    void setAnnotatedPackages(String[] annotatedPackages);

    /**
     * @param addAnnotatedPackages 设置 addAnnotatedPackages
     */
    void addAnnotatedPackages(String ... addAnnotatedPackages);

    /**
     * @param packagesToScan 设置 packagesToScan
     */
    void setPackagesToScan(String[] packagesToScan);

    /**
     * @param addPackagesToScan 设置 addPackagesToScan
     */
    void addPackagesToScan(String ... addPackagesToScan);

    /**
     * @param jtaTransactionManager 设置 jtaTransactionManager
     */
    void setJtaTransactionManager(Object jtaTransactionManager);

    /**
     * @param resourceLoader 设置 resourceLoader
     */
    void setResourceLoader(ResourceLoader resourceLoader);

    /**
     * @return 返回 sessionFactory
     */
    SessionFactory getSessionFactory();

    /**
     * 属性改变后重新生成sessionfactory
     * @throws IOException
     */
    void afterPropertiesSet() throws IOException;

}